main()
{
    int n,a,b;
    printf("There are following numbers with 4 digits satisfied condition:\n");
    for(n=1000;n<10000;n++){
    a=n/100;
b=n%100;
if((a+b)*(a+b)==n)
printf("%d",n);    //lekai
    }
}